var builder = WebApplication.CreateBuilder(args);

builder.Services.AddOpenApi();

var app = builder.Build();

if (app.Environment.IsDevelopment())
{
    app.MapOpenApi();
}

app.MapGet("/api/search", EsHandle.Search).WithName("Search");
app.MapGet("/api/agg", EsHandle.Aggregation).WithName("Aggregation");

app.Run();
